package com.kexio.user.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.kexio.common.entity.BaseEntity;

/**
 * 角色权限关联实体
 * 
 * 对应数据库表 sys_role_permission
 * 存储角色与权限的多对多关系
 * 
 * @author kexio
 * @since 1.0.0
 */
@TableName("sys_role_permission")
public class RolePermission extends BaseEntity {
    
    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;
    
    /**
     * 角色ID
     */
    @TableField("role_id")
    private String roleId;
    
    /**
     * 权限ID
     */
    @TableField("permission_id")
    private String permissionId;
    
    // ==================== Getters and Setters ====================
    
    public String getId() { 
        return id; 
    }
    
    public void setId(String id) { 
        this.id = id; 
    }
    
    public String getRoleId() { 
        return roleId; 
    }
    
    public void setRoleId(String roleId) { 
        this.roleId = roleId; 
    }
    
    public String getPermissionId() { 
        return permissionId; 
    }
    
    public void setPermissionId(String permissionId) { 
        this.permissionId = permissionId; 
    }
    
    // ==================== ToString ====================
    
    @Override
    public String toString() {
        return "RolePermission{" +
                "id='" + id + '\'' +
                ", roleId='" + roleId + '\'' +
                ", permissionId='" + permissionId + '\'' +
                ", " + super.toString() +
                '}';
    }
}